﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VMDS.Business.Entities
{
    public enum VmState
    {
        OnlineOnly,LocalOnly,Both
    }

    public enum TaskPriorities
    {
        Low,Medium,High
    }
    public enum TaskStates
    {
        Created, InProcess,Cancelled,Completed
    }

    public partial class TaskPriority
    {
        private TaskPriorities _priority;
        public TaskPriorities EnumValue { get { return _priority; } set { _priority = value; } }

        private int getValue()
        {
            return (int) _priority;
        }
        private void setValue(int value)
        {
            _priority = (TaskPriorities) value;
        }

        public static implicit operator TaskPriority(TaskPriorities p)
        {
            return new TaskPriority() {EnumValue = p};
        }
        public static implicit operator TaskPriorities(TaskPriority p)
        {
            if (p == null) return TaskPriorities.Medium;
            return p.EnumValue;
        }
    }


    public partial class TaskState
    {
        private TaskStates _state;
        public TaskStates EnumValue { get { return _state; } set { _state = value; } }
        private int getValue()
        {
            return (int) _state;
        }
        private void setValue(int value)
        {
            _state = (TaskStates) value;
        }

        public static implicit operator TaskState(TaskStates s)
        {
            return new TaskState() {EnumValue = s};
        }
        public static implicit operator TaskStates(TaskState s)
        {
            return s.EnumValue;
        }

    }

}
